Skip to content

Add ANT Neuro EDX support and propagate new board IDs across bindings#803

Open
Andrey1994 wants to merge 5 commits intomasterfrom
codex/fix-clang-format-and-modularize-dynamic-library
Open

Add ANT Neuro EDX support and propagate new board IDs across bindings#803
Andrey1994 wants to merge 5 commits intomasterfrom
codex/fix-clang-format-and-modularize-dynamic-library

Conversation

@Andrey1994
Copy link
Copy Markdown
Member

Motivation

  • Add support for ANT Neuro EDX transport boards exposed via a gRPC service so ANT Neuro amplifiers can be used through BrainFlow.
  • Expose explicit EDX board ids across all language bindings and update CMake so EDX is an optional build component guarded by -DBUILD_ANT_EDX=ON.
  • Provide example test scripts demonstrating typical EDX workflows (connect, stream, trigger, impedance, mode transitions) for hardware validation.

Description

  • Introduces a new EDX board implementation under src/board_controller/ant_neuro_edx/ including ant_neuro_edx_impl.cpp, ant_neuro_edx.cpp, ant_neuro_edx_main.cpp, headers and a proto/EdigRPC.proto for gRPC/protobuf integration, plus a dynamic library target AntNeuroEdxLib enabled when BUILD_ANT_EDX is ON.
  • Adds the CMake plumbing to generate protobuf sources, check for Protobuf/gRPC libs, build the EDX shared lib, and install/copy artifacts when BUILD_ANT_EDX is enabled; adds option(BUILD_ANT_EDX ...) to the top-level CMakeLists.txt.
  • Registers multiple explicit ANT EDX board ids and mirrors board descriptors by cloning existing ANT layouts in brainflow_boards.cpp, and updates board_controller.cpp to construct AntNeuroEdxBoard when built or emit UNSUPPORTED_BOARD_ERROR otherwise.
  • Propagates new board ids and small API fixes across language bindings and type lists (Python, Java, C#, Julia, MATLAB, Node.js/TypeScript, Rust), and updates various BoardShim implementations to validate master_board for streaming/playback boards and to use the correct master_board when computing row counts.
  • Adds example/hardware test scripts under python_package/examples/tests/ (edx_full_lifecycle.py, edx_impedance.py, edx_mode_transitions.py) and documentation updates in docs/BuildBrainFlow.rst and docs/SupportedBoards.rst describing how to build with -DBUILD_ANT_EDX=ON and usage notes.
  • Miscellaneous small fixes: newline/formatting fixes and minor language-binding tidy-ups.

Testing

  • No automated CI tests were executed as part of this change; the PR includes Python example scripts intended for manual/hardware validation against a real ANT Neuro device and a running EDX gRPC server. These example scripts exercise connect/start/stream/impedance/trigger and release flows but require hardware to run.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37a64fe042

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +941 to +943
{"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}},
{"ref_resistance_channels", {29}},
{"gnd_resistance_channels", {30}},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve EE-511 ref/gnd impedance channels

Board 51’s descriptor now limits resistance_channels to EEG indices and moves ref/ground into separate keys, but the legacy ANT implementation (AntNeuroBoard::read_thread) still consumes only resistance_channels when mapping impedance data. As a result, reference/ground impedance values are no longer written or returned via get_resistance_channels for ANT_NEURO_EE_511_BOARD, which is a regression for existing non-EDX EE-511 workflows.

Useful? React with 👍 / 👎.

${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/ant_neuro_edx/inc
${ANT_EDX_GENERATED_DIR}
)
target_link_libraries (AntNeuroEdxLib PRIVATE ${BOARD_CONTROLLER_NAME} gRPC::grpc++ protobuf::libprotobuf)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid linking EDX plugin to hidden BoardController internals

Linking AntNeuroEdxLib directly to ${BOARD_CONTROLLER_NAME} makes the new plugin depend on C++ internals (e.g., Board/DynLibBoard) while this project globally compiles with hidden visibility, so those symbols are not exported as a stable shared-library ABI. In BUILD_ANT_EDX=ON builds this can leave unresolved C++ symbols in the EDX plugin and surface as undefined-symbol failures when EDX entry points are called.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant